package org.tlipoca.smarticle.client;

import org.genntii.smcommon.result.Result;
import org.genntii.smdomain.doc.VO.UserDocVO;
import org.genntii.smdomain.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.Map;

@FeignClient("sm-userServer")
public interface UserClient {

    @GetMapping("/user/{userId}")
    Result<UserVO> getUserById(@PathVariable Long userId);

    @GetMapping("/user")
    Result<Map<Long, UserVO>> getUserListMapByIds(@RequestParam("userIds") ArrayList<Long> userIds);

    @GetMapping("/user/userdoc")
    Result<UserDocVO> getUserDocVOById(@RequestParam("userId")Long userId);
}
